<?php


namespace App\Transformers\Wechat;


use League\Fractal\TransformerAbstract;

class WechatReplyTransFormer extends TransformerAbstract
{
    public function transform($data)
    {
    return [
         'id'=>$data->id,
         'type' =>$data->type ?? '',
         'content' =>$data->content ?? '',
         'status' =>$data->status ?? '',
         'hide' =>$data->hide ?? '',
        'deleted_at' => $data->deleted_at ? $data->deleted_at->format("Y-m-d H:i:s") : '',
        'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
        'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
    ];

    }

}

